package com.aabte.design.pattern.behavioral.command;

public class Test {

    public static void main(String[] args) {

        CourseVideo javaVideo = new CourseVideo("Java视频");

        OpenCourseVideoCommand openCourseVideoCommand = new OpenCourseVideoCommand(javaVideo);
        CloseCourseVideoCommand closeCourseVideoCommand = new CloseCourseVideoCommand(javaVideo);

        Staff staff = new Staff();
        // 接收命令
        staff.addCommand(openCourseVideoCommand);
        staff.addCommand(closeCourseVideoCommand);

        // 执行命令
        staff.executeCommands();

        /*
        Java视频 - 课程视频打开.
        Java视频 - 课程视频关闭.
         */

    }

}
